<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <% if @project.present? and @version.present? %>
      <title><%= @project.name %> (<%= @version.version_number %>) API Documentation</title>
    <% else %>
      <title>API Documentation</title>
    <% end %>
    <%= stylesheet_link_tag    "jsdoc/application" %>
    <%= javascript_include_tag "jsdoc/application" %>
    <%= csrf_meta_tags %>
    <%= yield :head %>

    <% if @project.present? %>
      <script type="text/javascript">
        window.URL_ROOT = <%= raw(project_welcome_path(@project.slug, @version.version_number).to_json) %>
      </script>
    <% end %>
  </head>
  <body>
    <header>
      <% if content_for?(:header) %>
        <%= yield :header %>
      <% else %>
        <%= render :partial => 'layouts/jsdoc/header' %>
      <% end %>
    </header>
    <% if content_for?(:aside) %>
      <aside>
        <%= yield :aside %>
      </aside>
    <% else %>
      <% unless @version.nil? %>
        <aside>
          <%= render :partial => 'layouts/jsdoc/aside_symbol_list' %>
        </aside>
      <% end %>
    <% end %>
    <div id="wrapper"<% if content_for?(:toolbar) %> class="has_toolbar"<% end %>>
      <% if content_for?(:toolbar) %>
        <nav class="toolbar">
          <%= yield :toolbar %>
        </nav>
      <% end %>
      <div id="content">
        <%= yield %>
      </div>
    </div>
    <footer>
      <% if content_for?(:footer) %>
        <%= yield :footer %>
      <% else %>
        <p><%= link_to('jsdoc-rails', 'https://github.com/RyanWilliams/jsdoc-rails') %> v<%= Jsdoc::ENGINE_VERSION %></p>
      <% end %>
    </footer>
  </body>
</html>
